package lanxing.future.base.chapter15;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年4月28日
 *
 */
public class TestApply {

}

class Apply {
    public static <T,S extends Iterable<? extends T>> void apply(S ss, Method m, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        for(T s: ss) {
            m.invoke(s, args);
        }
    }
}
